<style type="text/css">
    /*#resourceModal {*/
        /*left:39%*/
    /*}*/
</style>
<h3 class="page-title">检查指标模版</h3>
<div class="tabbable-custom">
    <div class="portlet">
        <div class="portlet-title">
            <button class="btn btn-success title-action" ng-click="templateGrid.add()"
                    tabindex="0">
                <i class="fa fa-plus"></i> 新增指标
            </button>
            <a href="javascript:void(0);" class="title-operation search-expand">筛选</a>

            <div class="title-search-box">
                <input type="text" placeholder="请输入指标名称" class="search-field"
                       style="width: 180px;" maxlength="100" ng-model="templateGrid.query.quickSearchName">
                <a class="fa fa-search" ng-click="templateGrid.query(templateGrid.query.quickSearch = 1)"></a>
            </div>
        </div>
        <div class="portlet-search-body" style="display: none;">
            <form class="form-inline" role="form">
                <div class="form-group">
                    <div class="col-md-4">
                        <div class="input-icon">
                            <i class="fa fa-user"></i>
                            <input class="form-control" placeholder="指标名称" ng-model="templateGrid.query.templateName">
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-4">
                        <div class="input-icon">
                            <i class="fa fa-mobile-phone"></i>
                            <select class="form-control" name="status" ng-model="templateGrid.query.templateType"
                                    style="width: 200px;color: #b3b3b3;"
                                    ng-options="opt.value as opt.name for opt in options.templateType">
                                <option value="">-- 类型 --</option>
                            </select>
                        </div>
                    </div>
                </div>
                <button class="btn btn-primary" ng-click="templateGrid.query(templateGrid.query.quickSearch = 0)"><i class="fa fa-search"></i> 搜索</button>
                <button class="btn btn-primary" ng-click="templateGrid.reset()">
                    <i class="fa fa-rotate-left"></i> 重置
                </button>
            </form>
        </div>
        <div class="portlet-body" style="width: 100%">
            <table ed-grid="templateGrid" class="table table-striped table-bordered table-hover dataTable"
                   ed-url="template/query.do" ed-model="template" style="width: 100%">
                <thead>
                <tr>
                    <th ed-data="_index"></th>
                    <th ed-data="templateName" style="width:150px;">指标名称</th>
                    <th ed-data="templateType | code : 'templateType'" style="width:100px;">类型</th>
                    <th style="width:110px;">操作</th>
                </tr>
                </thead>
            </table>
        </div>
    </div>
</div>

<div ed-modal="templateAddModal" data-options="width:'600px', static:true,icon: 'fa-user'">
    <div class="form" style="overflow: auto;height: 200px;">
            <form style="padding-left: 90px;" action="#" class="form-horizontal form-row-seperated w5c-form" w5c-form-validate novalidate name="validateForm">
                <div class="form-body">
                	<div class="row">
                        <div class="col-md-9">
	                        <div class="form-group">
		                        <label class="col-md-4 control-label"><span class="required">*</span>指标名称</label>
		                        <div class="col-md-8">
		                            <input type="text" class="form-control" name="templateName"
		                                   ng-model="template.templateName" required>
		                        </div>
		                    </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-9">
                            <div class="form-group">
                                <label class="col-md-4 control-label"><span class="required">*</span>类型</label>
                                <div class="col-md-8">
                                    <select class="form-control" name="templateType" ng-model="template.templateType"
                                            ng-options="opt.value as opt.name for opt in options.templateType"
                                            required>
                                        <option value="">-- 类型 --</option>
                                    </select>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </form>
    </div>
</div>


